export function getTarget(target) {
  let targetElement;
  if (!target) {
    targetElement = window;
  } else if ('current' in target) {
    targetElement = target.current;
  } else {
    targetElement = target;
  }
  return targetElement;
}
